import { forwardRef } from 'react'

const RefInput = forwardRef(function RefInput(props, ref) {
  return (
    <input
      value={props.inputValue}
      ref={ref}
      style={{ width: '70%', flex: 1, marginRight: '20px' }}
      placeholder="发一条友善的评论"
      onChange={props.onChange || (e => props.setValue(e.target.value))}
    />
  )
})

export default RefInput
